<div class="contact-from">
  <div class="match-filter-title">
    <i class="back" (click)="close()"></i>
    <div>填写联系人信息</div>
  </div>
  <!--<form #contactForm="ngForm">-->
  <form [formGroup]="customForm">
    <div class="contact-detail">
      <div class="input-clum">
        <span>公司名称</span>
        <div class="input-info">
          <input type="text"
                 placeholder="4~80个字符"
                 required name="companyName"
                 formControlName="company"
                 [(ngModel)]="contactObj.companyName"
                 (blur)="CheckCompany()"
                 (focus)="ConpanyFocus()"
                 minlength="4"
                 maxlength="80"
          >
          <p *ngIf="companyCheck">请填写4~80个字符的公司名称</p>
        </div>
      </div>
      <div class="input-clum">
        <span>联系人</span>
        <div class="input-info">
          <input type="text"
                 placeholder="2~40个字符"
                 required name="contactPerson"
                 formControlName="contactPerson"
                 [(ngModel)]="contactObj.contactPerson"
                 (blur)="CheckName()"
                 (focus)="NameFocus()"
                 minlength="2"
                 maxlength="40"
          >
          <p *ngIf="nameCheck">请填写2~40个字符的联系人</p>
        </div>
      </div>
      <div class="input-clum">
        <span>手机号码</span>
        <div class="input-info">
          <input type="text"
                 placeholder="11位数字"
                 required name="contactPhone"
                 formControlName="contactPhones"
                 [(ngModel)]="contactObj.contactPhone"
                 (blur)="CheckPhone()"
                 (focus)="PhoneFocus()"
          >
          <p *ngIf="phoneCheck">请填写正确格式的手机号码</p>
        </div>
      </div>
    </div>
    <div class="contact-introduce">
      <p>需求描述</p>
      <span *ngIf="requestInfo" class="tips">请输入10~1000字需求描述</span>
      <div class="textareaLocation">
        <textarea name="purposeDesc"
                  class="textarea"
                  placeholder="请输入简介"
                  [(ngModel)]="contactObj.purposeDesc"
                  formControlName="introduce"
                  (blur)="CheckIntroduce()"
                  (focus)="IntroduceFocus()"
                  minlength="10"
                  maxlength="1000"
        ></textarea>
        <p><span [class.hasValue]="contactObj.purposeDesc.trim()!=''"
                 [innerHTML]="contactObj.purposeDesc.length"
        >0</span><span>/1000</span></p>
      </div>
    </div>
  </form>
  <div class="contact-form-position">
    <div [class.contact-now]="customForm.valid" #btnWrap (click)="onSubmit(customForm)" >提交</div>
  </div>
</div>
